home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_095 / gomf / gomfinfo < prev    next >
Text File  |  1992-05-06  |  16KB  |  310 lines

  1.  
  2.                                     GOMF1.0
  3.                                     ~~~~~~~
  4.   Introduction
  5.   ~~~~~~~~~~~~
  6.  
  7.   Please read the entire text of this file before using GOMF1.0.  It contains
  8.   important information and could save you a lot of hassle.
  9.  
  10.   The name of this application is an acronym for 'Get Outa My Face'.  I've
  11.   found myself mumbling this phrase all too often when public domain or even
  12.   commercial programs have created errors, bringing on the ubiquitous guru
  13.   meditation alert.  Of course the majority of these system traps I've seen
  14.   were caused by address errors in my own code, while in the early stages of
  15.   writing and debugging my own software.
  16.  
  17.   It is true that the user has the option, at the system requester presented
  18.   before the alert, of simply ignoring it and continuing to run programs,
  19.   even though the system is somewhat crippled.  I, however, found this to be
  20.   almost as inconvenient as rebooting.  I did so only when I had to save
  21.   valuable data to disk or was anticipating another problem with the program
  22.   I was developing.  At times I would run my program, select an option,
  23.   crash, make notes, click the system requester to the rear, run the program
  24.   again, select another option, crash, and make more notes, in a loop until I
  25.   had all the information I could glean.  Then I'd click a system requester
  26.   back to the front and go through the guru meditation every Amiga user has
  27.   been forced into.  There had to be a better way!
  28.  
  29.   Apparently in the nuclear power generation industry when the operating
  30.   system senses a grevious enough malfunction it shuts itself down.  The
  31.   operators or technicians then say that the 'system scrammed'.  I think this
  32.   is an appropriate way of describing the Amiga user's perdicament.
  33.  
  34.   My first experiments with the system traps was to write an error handler
  35.   module, which is linked to the assembler code I'm developing, that allows
  36.   me to clean up and debug while never crashing at all.  This worked rather
  37.   well because the program that caused the error 'knew' itself intimately and
  38.   could therefore extricate itself, upon user direction to do so, from the
  39.   system, with no ill effects.  I should mention at this point that the kind
  40.   of crashes I'm talking about are only those that cause a requester, not the
  41.   ones that have the system so badly out of shape that the normal interface
  42.   is gone.  The link module would protect system integrity only from it's own
  43.   errors.  This meant that, if some other utility I was using caused an
  44.   error, then the guru would come with the handbasket.
  45.  
  46.   The second version of GOMF1.0 was designed to provide it's error handling
  47.   features globally within the system.  It would then respond to errors in
  48.   any task or process.  The error handler would know nothing about a program,
  49.   except what it could fetch out of the system structures.  This means that
  50.   GOMF1.0 can only remove public memory, including, the task or process, its'
  51.   memory allocations, messages unanswered and display screens and windows,
  52.   from the system.  This works well.  It may be that there is one more opener
  53.   than closer left in a library, device or resource, but this dosen't impede
  54.   normal operations like the guru alert is want to do.  Any memory allocated
  55.   and maintained in a private memory list or messages saved internally by a
  56.   program, cannot be released to the system.
  57.  
  58.   The benifits of the GOMF1.0 system make it worth using, I believe, even for
  59.   the casual user.  The most obvious reason is the reduction in the frequency
  60.   of having to reboot the system at the guru meditation prompt.  This will
  61.   save you time.  When you don't have to reboot, you don't have to wait while
  62.   your startup-sequence configures your machine.  I've found this a real boon
  63.   because I was reticent to have a lot of background tasks or utilities
  64.   activated, mainly because I'd have to wait for them to be set up each time
  65.   I was forced to reboot.  When using GOMF1.0 this is reduced to the minimum
  66.   possible, I believe.
  67.  
  68.   If you don't have to reset the Amiga, you loose no data, unless the creator
  69.   of the error has trashed your workspace.  This saves your work.  You have
  70.   the option of saving out to disk any important files.  I suggest doing this
  71.   to temporary disk files so that if the data is corrupted, you have a chance
  72.   to verify this before overwriting your originals.  A recoverable ram disk,
  73.   otherwise known as VD0:, also protects contents of ram from losses caused
  74.   by resets.  They can be mounted upon rebooting to recover their previous
  75.   contents.  They will not protect against data corruption caused by a 
  76.   runaway program either, however.  The main difference between GOMF1.0 and a
  77.   recoverable ram disk, to a user or programmer, is the same as the main 
  78.   difference between VD0: and RAM:, other than recoverability.  Floppy disk
  79.   is reasonably fast.  RAM: is very fast.  VD0: is somewhere in between.
  80.   From the standpoint of speed, GOMF1.0 and RAM: are preferable to VD0:.  'I
  81.   feel the need....the need for speed!'
  82.  
  83.   I can hear some of you devious (intelligent?) computerists out there
  84.   thinking... 'Why not use RAM: for speed, when disk intensive operations
  85.   are called for, and place all important data in VD0: files so that they can
  86.   be recovered if a reset is necessary, just in case GOMF1.0 is unable to
  87.   recover from the crash?'  You know, I'm glad you thought of that.  It works
  88.   well.  GOMF1.0, RAM: and VD0: are foundational tools for programming, at
  89.   least in the early stages.  Development is quicker and more reliable.
  90.  
  91.   Policies
  92.   ~~~~~~~~
  93.  
  94.   On all software described herein, I express no warrantee of, but not
  95.   limited to, the usefullness, method of operation, or the user's
  96.   satisfaction with the results.  Neither do I imply such a warrantee.  You
  97.   signify your willingness to exempt me from all responsibility for the
  98.   results of the use of these software products by your use of them.
  99.  
  100.   The GOMF1.0 software, listed below, may be shared with anyone, provided
  101.   this is done for no profit, other than a nominal fee for disk copying.  I
  102.   require also that all files listed be kept together as found.  I wish none
  103.   of this text file nor any of the executable programs be altered in any way.
  104.   GOMF1.0 and GOMF1.0.obj are shareware products which are to be utilized
  105.   only by those who pay the suggested sum of $5.00 each for the use of either
  106.   program.  If you find this software useful, please remit this minimal sum
  107.   to the address below.
  108.  
  109.   GOMF1.0 is not public domain software. Therefore, neither GOMF1.0 nor
  110.   GOMF1.0.obj may be included with any other program released, whether public
  111.   domain or commercial without the prior, written consent of the author,
  112.   Christian Johnsen.  If you wish to do so please arrange this by writing me
  113.   at the following address with the particulars.  I'll entertain customizing
  114.   this system for your particular application's use if required.
  115.  
  116.   I wish to mention, at this point, that I hope no one is offended by the
  117.   icon I've designed for these programs.  No disrespect was intended.
  118.  
  119.   Contents
  120.   ~~~~~~~~
  121.  
  122.   The disk on which you found this information file should contain the
  123.   following programs and text files plus their attendant icons.
  124.  
  125.   1.  GOMFinfo - this text file of instructions and terms. 
  126.  
  127.   2.  GOMF1.0 - the global error handler.
  128.  
  129.   3.  GOMF1.0.obj - the error handler object code link module.
  130.  
  131.   4.  Hey! - a program to allow recall of GOMF1.0 for user discretionary
  132.       operations on the program display.
  133.  
  134.   5.  Err1 - a simple Workbench screen error test program.
  135.  
  136.   6.  Err2 - an error test program with a custom double length screen,
  137.       containing fourteen windows.
  138.  
  139.   7.  Err3 - a custom double length screen error test program containing
  140.       no windows.
  141.  
  142.   8.  Err4 - an example test program linked with GOMF1.0.obj to demonstrate
  143.       the capabilities of the link module.
  144.  
  145.   9.  Err4.asm - the source code for Err4 that demonstrates the use of the
  146.       link module GOMF1.0.obj.
  147.  
  148.  
  149.   Instructions
  150.   ~~~~~~~~~~~~
  151.  
  152.   GOMF1.0 is the global system error handler which I designed for the
  153.   average Amigaiod.  It notifies the user that it has installed itself, then
  154.   snoozes until the system scrams.  Then, according to user selection, it
  155.   restores the system in one of four ways.  The other version of the program,
  156.   GOMF1.0.obj, was designed for programmers.  It must be linked to a program
  157.   after assembly or compilation.  It will handle errors similar to GOMF1.0,
  158.   except that it can be customized as described in 'Using GOMF1.0.obj'.  The
  159.   Hey! program is useful if it becomes necessary to reenter the error handler
  160.   because you have exited it prematurely.  The Err1, Err2, and Err4 programs
  161.   are provided so that you may test the operation of GOMF1.0 and familiarize
  162.   yourself with it's operation before you attempt to beat the guru under
  163.   normal operation conditions.  Err4 is a demo of a program linked to
  164.   GOMF1.0.obj.
  165.  
  166.   Using GOMF1.0
  167.   ~~~~~~~~~~~~~
  168.  
  169.   This program can be run either from the CLI or the Workbench.  To use the
  170.   program from the CLI enter...
  171.  
  172.   Run GOMF1.0
  173.  
  174.   I suggest that the program be kept in the C directory of the Workbench
  175.   disk, and the above line be added to your startup-sequence.  This way your
  176.   Amiga system will be made reasonably crash proof upon booting up.
  177.  
  178.   When run there will be a momentary window displayed informing you that
  179.   GOMF1.0 is activated.  It will detect any setup errors and report these, if
  180.   found, so that you'll know that the system is then not protected.  GOMF1.0
  181.   and GOMF1.0.obj examine system structures to determine which of either
  182.   68000, 68010 or 68020 microprocessors are on board and configures itself to
  183.   handle the appropriate supervisor stack frame.  I have not, at this time
  184.   (June 25, 1987), had the pleasure of testing this on either the 68010 or
  185.   68020 configured machines.  I would appreciate any feedback on the success
  186.   or failure of GOMF1.0 on either of these processors.
  187.  
  188.   Once an error is encountered, the normal system requester, giving the RETRY
  189.   or CANCEL options will be presented.  Select the CANCEL gadget.  The
  190.   SYSTEM SCRAMMED window will then be presented.  It contains useful
  191.   information, similar to that encoded into the guru meditation alert number,
  192.   but it is decoded and presented in English text.  This includes the alert
  193.   number, the program counter address of the instruction immediately
  194.   following the error, the library or vector type of the error, the general
  195.   type of problem and a description of a more specific nature.  This includes
  196.   all known error types listed in the developer's alerts include file.  There
  197.   are also four gadget options.  You must use caution when using any of this
  198.   tool's options. 
  199.  
  200.   The GOMF gadget removes, as safely as possible, the errant program, then
  201.   returns the system to normal processing.  It will not fix the problem in
  202.   the program, only remove the task or process without the need to reset the
  203.   computer.  Whenever the GOMF gadget is tweeked, the results of the
  204.   operation are displayed.  This would be either the completed message, if
  205.   successful, or an error message in the event of a failure.  Normally it is
  206.   only the removal of the display elements of a program which yield errors.
  207.   You can usually use the WHAP gadget as suggested in the error message to
  208.   recover the display should this occur, before attempting to use GOMF a
  209.   second time.  The messages provided by the error handler should be 
  210.   sufficient to guide you through the removal of a program, but please use
  211.   the Err1, Err2 and Err4 programs to practice operations.
  212.  
  213.   The WHAP gadget is provided for use when a program's windows or screen
  214.   elude the automatic scan features of GOMF.  For instance, if it is
  215.   ascertained that only the WB screen is active, then you will be requested
  216.   to click on the WHAP gadget followed by the offensive program's window or
  217.   screen.  WHAP will remove the display element selected.  WHAP will make it
  218.   possible to remove piece by piece a multi-screen and/or multi-window
  219.   display, if necessary.  You will have to either, use the Left-AMIGA and N
  220.   or Left-AMIGA M key combinations to flip between the Workbench and the
  221.   applications' screen if it uses one of its' own, or pull down the Workbench
  222.   screen to expose the faulty programs' display, when using this option.
  223.  
  224.   The RESET gadget allows a reboot of the system without visiting the guru
  225.   or giving the Amiga three finger salute.
  226.  
  227.   The GURU gadget calls the normal system alert as usual.
  228.  
  229.   Using GOMF1.0.obj
  230.   ~~~~~~~~~~~~~~~~~
  231.  
  232.   GOMF1.0.obj is an object code file generated by an assembler.  For a
  233.   programmer to use it the code must be linked to the object output of an
  234.   assembler or compiler.  The ALINK linker directives FROM or ROOT are used
  235.   to accomplish this.  For example...
  236.  
  237.   ALINK MyProg,GOMF1.0.obj to ProgName
  238.  
  239.   GOMF1.0.obj provides the same protection as GOMF1.0, however the linked
  240.   module allows the programmer to design his or her own method of handling
  241.   these error returns.
  242.  
  243.   Setting up your source code for use with GOMF1.0.obj is relatively easy.
  244.   Your code must make references to the following external labels, _GOMF
  245.   and _GOMFEnding.  You may also wish to utilize other information with
  246.   external reference labels of _WHAP, _ProgramCounter, _GeneralErr,
  247.   _LibraryErr, _SpecificErr.  GOMF1.0.obj requires your source define it's
  248.   own external label, _ErrorHandler, which is coded to recieve the return to
  249.   normal processing, after the error has been neutralized.  You will have to
  250.   write up a custom routine called _ErrorHandler that will recieve the
  251.   program flow after an error has been detected elsewhere in the program.
  252.   This may be simply closing screens, windows and libraries before exiting,
  253.   or you may wish to analyse the situation more completely and continue
  254.   execution of your program code at another point.  The potential of this
  255.   feature is not small.
  256.  
  257.   Early on in your program do a simple call of _GOMF such as JSR _GOMF or
  258.   GOMF().  This will activate the features of the linked module.  Before
  259.   your program cleans up and ends you must call _GOMFEnding in a like
  260.   fashion so that _GOMF can release it's memory useage etc.
  261.  
  262.   To recap, _GOMF is the initialization entry point.  _GOMFEnding is the
  263.   termination entry point.  The other labels available are a structure laid
  264.   out as follows...
  265.  
  266.   STRUCTURE  GOMF1.0,0
  267.   ULONG      _ProgramCounter  value of the program counter after the error  
  268.   APTR       _LibraryErr      pointer to null terminated string discriptor  
  269.   APTR       _GeneralErr      pointer to null terminated string discriptor  
  270.   APTR       _SpecificErr     pointer to null terminated string discriptor  
  271.   UBYTE      _WHAP            boolean TRUE or FALSE of WHAP gadget selction
  272.  
  273.   See the source code example of the use of this structure in Err4.asm for
  274.   more clarification.
  275.  
  276.   Credits
  277.   ~~~~~~~
  278.  
  279.   GOMF1.0, GOMF1.0.obj, Err1, Err2, Err3, Err4, and Hey! were written
  280.   entirely in assembly language by Christian Johnsen.
  281.  
  282.  
  283.  
  284.   I trust this application is of use and value to you, and I welcome any
  285.   communication via mail at this address.
  286.  
  287.  
  288.                                Christian Johnsen
  289.                               3169  Consort Court
  290.  
  291.                                    Clearbrook
  292.  
  293.                                 British Columbia
  294.  
  295.                                     Canada
  296.  
  297.                                    V2T  4J5
  298.  
  299.                                 (604) 853-5426
  300.  
  301.